import React from 'react';
import MButton from './common/MButton';
import MInput from './common/MInput';
import MTooltip from './common/MTooltip';
import MBackTop from './common/MBackTop';
import MIcon from './common/MIcon';
const ButtonGroup = MButton.Group;

class Main extends React.Component{
	constructor(props){
		super(props);
		this.handler = this.handler.bind(this);
	}
	handler(){
		console.log("hehe");
		// console.log("Tooltip",this.Tooltip);
		console.log("Input",this.Input);
	}
	render(){
		return (
			<div className="Main_div">
				<MIcon type="rightcircle" />
				<ButtonGroup>
					<MButton type="ghost" onClick={this.handler} size="large">新建</MButton>
					<MButton type="ghost" onClick={this.handler} size="large">新建</MButton>
					<MButton type="ghost" onClick={this.handler} size="large">新建</MButton>
				</ButtonGroup>
				<MTooltip title="测试绝对定位" placement="top" ref={(el) => this.Tooltip = el}>
      				<MButton type="dashed" onClick={this.handler} size="large">新建</MButton>
      			</MTooltip>
      			<MInput size="large" type="search" onChange={this.handler} defaultValue="meichao" ref={(el) => this.Input = el} />
      			<MTooltip title="测试绝对定位" placement="top" ref={(el) => this.Tooltip = el}>
      				梅超
      			</MTooltip>
      			<MBackTop onClick={this.handler} />
      			<div>asdasd</div>
				<div>asdasd</div>
				<div>asdasd</div>
				<div>asdasd</div>
				<div>asdasd</div>
				<div>asdasd</div>
				<div>asdasd</div>
				<div>asdasd</div>
				<div>asdasd</div>
				<div>asdasd</div>
				<div>asdasd</div>
				<div>asdasd</div>
				<div>asdasd</div>
				<div>asdasd</div>
				<div>asdasd</div>
				<div>asdasd</div>
				<div>asdasd</div>
				<div>asdasd</div>
				<div>asdasd</div>
				<div>asdasd</div>
				<div>asdasd</div>
				<div>asdasd</div>
				<div>asdasd</div>
				<div>asdasd</div>
				<div>asdasd</div>
				<div>asdasd</div>
				<div>asdasd</div>
				<div>asdasd</div>
				<div>asdasd</div>
				<div>asdasd</div>
				<div>asdasd</div>
				<div>asdasd</div>
				<div>asdasd</div>
      		</div>
    	);
	}
}
module.exports = Main;